//
//  MVPlayerController.m
//  LiquorChain
//
//  Created by apple on 2018/12/28.
//  Copyright © 2018年 王冬. All rights reserved.
//

#import "MVPlayerController.h"
#import "PlayerView.h"
#import "UIView+SetRect.h"
@interface MVPlayerController ()

@end

@implementation MVPlayerController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"操作指南";
    PlayerView *playerView = [[PlayerView alloc] initWithFrame:CGRectMake(0, kNavBarHeight, SCREEN_WIDTH, 300)];
    [self.view addSubview:playerView];
    //视频地址
    playerView.url = [NSURL URLWithString:@"http://static.tripbe.com/videofiles/20121214/9533522808.f4v.mp4"];
    //播放
    [playerView playVideo];
    //返回按钮点击事件回调
    [playerView backButton:^(UIButton *button) {
        NSLog(@"返回按钮被点击");
    }];
    //播放完成回调
    [playerView endPlay:^{
        NSLog(@"播放完成");
    
    }];

    // Do any additional setup after loading the view.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
